package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_admin_user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AdminUserModel {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer departmentId;
    @TableField(exist = false)
    private String departmentText;
    private String account;
    private String pwd;
    private String realName;
    private int status;
    @TableField(exist = false)
    private String token;
    @TableField(exist = false)
    private String identity;
    private String lastLoginIp;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private LocalDateTime lastLoginTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private LocalDateTime updateTime;
}
